﻿//Copyright (c) Microsoft Corporation. All rights reserved.

using Microsoft.Ted.Wacel.Cache;
using System.Diagnostics;

namespace Microsoft.Ted.Wacel.TestConsole.PerformanceTests
{
    public class CircularBufferPerfTest
    {
        public static int Add(Stopwatch watch)
        {
            int count = 200;
            string load = new string('X', 1024);
            CircularBuffer<string> buffer = new CircularBuffer<string>("perf_buffer", 5);
            watch.Restart();
            for (int i = 0; i < count; i++)
                buffer.Add(load);
            watch.Stop();
            return count;
        }
    
    }
}
